using System.Collections;
using System.Collections.Generic;
using UnityEngine;

public class Desktop : MonoBehaviour
{
    // Start is called before the first frame update

    private void Awake()
    {
        WaterBox.EventSystem.get().registrationEvent(WaterBox.EventEnum.EventEnumType.UI_WINDYS_OPEN, Show);
        WaterBox.EventSystem.get().registrationEvent(WaterBox.EventEnum.EventEnumType.UI_WINDYS_CLOSE, Hide);
    }
    private void OnDestroy()
    {
        WaterBox.EventSystem.get().Unregister(WaterBox.EventEnum.EventEnumType.UI_WINDYS_OPEN);
        WaterBox.EventSystem.get().Unregister(WaterBox.EventEnum.EventEnumType.UI_WINDYS_CLOSE);
    }
    void Start()
    {
        
    }
    void Show()
    {
        gameObject.SetActive(true);

    }
    void Hide()
    {
        gameObject.SetActive(false);

    }

    // Update is called once per frame
    void Update()
    {
        
    }
}
